package com.example.springiocdi.Controller;


import com.example.springiocdi.model.DbTypes;
import com.example.springiocdi.model.Person;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

//@RequestMapping("/yml")
@Controller
public class YmlController {

    @Value("${my.key1}")
private Integer key1;
    @Value("${my.key2}")
private Integer key2;

    @Autowired
    private Person person;

    @Autowired
    private DbTypes dbTypes;


@PostConstruct
    public void init(){
    System.out.println(key1);
    System.out.println(key2);
    System.out.println(person);
    System.out.println(dbTypes);
}

}
